<?php
	//ob_start();
	session_start();



	//$_SESSION["kob"] = "thaweesakp";

	$auth		= $_SESSION["auth"];

	$fullname	= $_SESSION["fullname"];
	$_SESSION["lvl_id"] = "060401";
	
	$titlePage	= "Title pages";
	$titlePage	= $_REQUEST["titlePage"];

	//define("AUTH", true);

	$auth = true;
	if (!$auth) {
		header("Location: login.php");
	}

	include("lvlname.php");

	//echo $_SESSION["lvl1"] ." ". $_SESSION["lvl2"] ." ". $_SESSION["lvl3"] ." ". $_SESSION["lvl4"];
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
    <title>ระบบบริหารรายรับและรายจ่าย</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="./bootstrap/css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
    </style>
    <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
	<!-- <link href="bootstrap/css/bootstrap-classic.css" rel="stylesheet"> -->

	<style type="text/css">
		@import url("jquery-ui/themes/base/jquery-ui.css");

		@import url("bootstrap/css/dataTables.bootstrap.css");
		@import url('css/jquery-dialog2/jquery.dialog2.css');
	</style>

	<link href="css/gob.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="./bootstrap/js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="./bootstrap/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="./bootstrap/ico/apple-touch-icon-114-precomposed.png">
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./bootstrap/ico/apple-touch-icon-72-precomposed.png">
	<link rel="apple-touch-icon-precomposed" href="./bootstrap/ico/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="./bootstrap/ico/favicon.png">
	<!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

	<script type="text/javascript" charset="utf-8" src="bootstrap/js/bootstrap.js"></script>
	<script type="text/javascript" charset="utf-8" src="bootstrap/js/jqBootstrapValidation.js"></script>

	<script type="text/javascript" charset="utf-8" src="jquery-ui/ui/jquery-ui.js"></script>

	<script type="text/javascript" charset="utf-8" src="js/jquery.dialog2.js"></script>
	<script type="text/javascript" charset="utf-8" src="js/jquery.dialog2.helpers.js"></script>
	<script type="text/javascript" charset="utf-8" src="js/jquery.dataTables.js"></script>

	<script type="text/javascript" charset="utf-8" src="js/ZeroClipboard.js"></script>
	<script type="text/javascript" charset="utf-8" src="js/TableTools.js"></script>
	<script type="text/javascript" charset="utf-8" src="bootstrap/js/dataTables.bootstrap.js"></script>

	<?php
		$itab = $_REQUEST["itab"];
	?>

	<script type="text/javascript">
		$(document).ready(function(){
			//$("input,select,textarea").not("[type=submit]").jqBootstrapValidation();

			var itab = "<?php echo $itab; ?>";
			//alert(itab);
			if (itab)	{
				$('#myTab a[href="#' + itab +'"]').tab('show');
			}
			
			$('#myTab a').click(function (e) {
				e.preventDefault();
				$(this).tab('show');
			});

			//$('#myTab a[href="#profile"]').tab('show');

			$( "#datepicker" ).datepicker({
				showButtonPanel: true
			 });

					
		});

	</script>
</head>

<body>

	
	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="brand" href="index.php">ระบบบริหารรายรับและรายจ่าย</a>

				<div class="nav-collapse collapse">
					<ul class="nav">
					  <li><a href="index.php">หน้าหลัก</a></li>
					  <!-- <li><a href="index.php?pages=vProject">โครงการ</a></li>-->
					  
					  <li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown">การเบิกฎีกา <b class="caret"></b></a>
						<ul class="dropdown-menu">
						  <li><a href="index.php?pages=frmPetition&titlePage=ฎีกาเบิกเงินตามงบประมาณรายจ่าย">เบิกฏีกาตามงบประมาณรายจ่ายประจำ</a></li>
						  <li><a href="index.php?pages=vProject&titlePage=ฎีกาเบิกตามรายจ่ายเพื่อการลงทุน">เบิกฏีกาตามรายจ่ายเพื่อการลงทุน</a></li>
						  <!-- 
						  <li class="divider"></li>
						  <li class="nav-header">Nav header</li>
						  <li><a href="#">Separated link</a></li>
						  <li><a href="#">One more separated link</a></li>
						  -->
						</ul>
					  </li>

					  <li><a href="index.php?pages=finance">งานคลัง</a></li>
					  <li><a href="index.php?pages=">ออกเช็ค</a></li>
					  <li><a href="phpinfo.php">PHP Info</a></li>
					  
					</ul>					

					<ul class="nav pull-right">
                            <li class="dropdown">
								<a href="#" data-toggle="tooltip" title="<?php echo $_SESSION["lvlfull"]; ?>">ทวีศักดิ์   พุฒิสันติกุล</a>
                                
                            </li>
                            <li class="dropdown ">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-wrench icon-white"></i></a>
                                <ul class="dropdown-menu">
                                    <li><a href="index.php">ตั้งค่าโปรไฟล์</a></li>
                                    <li><a href="logout.php">ออกจากระบบ</a></li>
                                </ul>
                            </li>
                        </ul>
					<!--
					<form class="navbar-form pull-right">
						<input class="span2" type="email" placeholder="Email">
						<input class="span2" type="password" placeholder="Password">
						<button type="submit" class="btn">Sign in</button>
					</form>
					-->
				</div>


				<!--/.nav-collapse -->
			</div><!--/container -->
		</div><!--/navbar-inner -->
	</div><!--/navbar navbar-inverse navbar-fixed-top -->

	<div class="container">
		<h1><?php echo $titlePage; ?></h1>
		<p>คำอธิบายต่างๆ เพิ่มเติม อื่นๆ</p>
		<!-- Example row of columns -->
		<div class="row-fluid">
	        <div class="span12">
				<?php
                    if ($pages) {
                        include($pages . ".php");
                    } else {
                        include("home.php");
                    }
                  ?>
			</div> <!-- /span12 -->
		</div> <!-- /row-fluid -->

	</div> <!-- /container -->

		<div class="subnav navbar navbar-fixed-bottom">
	           <div class="navbar-inner">
			   <div class="container">
                <div style="margin-top: 10px; margin-left: 10px;">
                    <div class="pull-left">
                        <a href="index.php?pages=team">ทีมพัฒนา</a>&nbsp;&nbsp;&nbsp;
                        <a href="index.php?pages=contents&amp;id=4">คู่มือการใช้งาน</a>&nbsp;&nbsp;&nbsp;
                    </div>
                    <div  class='pull-right'>Udoncity 2013&nbsp;&nbsp;&nbsp;&nbsp;</div>
                </div>
				</div>
            </div>

	</div>
 
</body>
</html>